package com.wicket.okrframework.integration.dto;

import com.wicket.okrframework.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;
import lombok.Data;

@Data
public class StaffingDto extends BaseDto implements Serializable {

  /**
   * 职务ID:
   */
  @ApiModelProperty("职务ID")
  private String positionId;

  /**
   * 组织ID:
   */
  @ApiModelProperty("组织ID")
  private String organizationId;

  /**
   * 部门ID:
   */
  @ApiModelProperty("部门ID")
  private String deptId;

  /**
   * 是否兼职编制:
   */
  @ApiModelProperty("是否兼职编制")
  private String isPartTimeStaffing;

  /**
   * 是否自动创建:
   */
  @ApiModelProperty("是否自动创建")
  private String isAutoCreate;

  /**
   * 主体生命周期:
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 编制数量:
   */
  @ApiModelProperty("编制数量")
  private Long staffingNum;

  /**
   * 编制ID:
   */
  @ApiModelProperty("编制ID")
  private String staffingId;

  /**
   * 编制编号:
   */
  @ApiModelProperty("编制编号")
  private String staffingNumber;

  /**
   * 编制是否在职:
   */
  @ApiModelProperty("编制是否在职")
  private String inductionState;

  /**
   * 临时锁定状态:
   */
  @ApiModelProperty("临时锁定状态")
  private String tempLock;

  /**
   * 冗余职务名称:
   */
  @ApiModelProperty("冗余职务名称")
  private String positionIdName;

  /**
   * 职务级别名称:
   */
  @ApiModelProperty("职务级别名称")
  private String positionGradeName;

  /**
   * 岗位名称:
   */
  @ApiModelProperty("岗位名称")
  private String stationName;

  /**
   * 身份人员ID:
   */
  @ApiModelProperty("身份人员ID")
  private String originalRoleMemberId;

  /**
   * 身份人员编号:
   */
  @ApiModelProperty("身份人员编号")
  private String roleMemberCode;

  /**
   * 是否兼职:
   */
  @ApiModelProperty("是否兼职")
  private String isPtJob;

  /**
   * 个人账号ID:
   */
  @ApiModelProperty("个人账号ID")
  private String userId;

  /**
   * 真实头像:
   */
  @ApiModelProperty("真实头像")
  private String userFace;

  /**
   * 真实姓名:
   */
  @ApiModelProperty("真实姓名")
  private String idCardName;

  /**
   * 用户昵称:
   */
  @ApiModelProperty("用户昵称")
  private String nickName;

  /**
   * 部门名称（中文）:
   */
  @ApiModelProperty("部门名称（中文）")
  private String deptName;

  /**
   * 部门简称:
   */
  @ApiModelProperty("部门简称")
  private String deptShortName;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    StaffingDto that = (StaffingDto) o;
    return (
      positionId == that.positionId &&
      organizationId == that.organizationId &&
      deptId == that.deptId &&
      isPartTimeStaffing == that.isPartTimeStaffing &&
      isAutoCreate == that.isAutoCreate &&
      subjectLifeCycle == that.subjectLifeCycle &&
      staffingNum == that.staffingNum &&
      staffingId == that.staffingId &&
      staffingNumber == that.staffingNumber &&
      inductionState == that.inductionState &&
      tempLock == that.tempLock &&
      positionIdName == that.positionIdName &&
      positionGradeName == that.positionGradeName &&
      stationName == that.stationName &&
      originalRoleMemberId == that.originalRoleMemberId &&
      roleMemberCode == that.roleMemberCode &&
      isPtJob == that.isPtJob &&
      userId == that.userId &&
      userFace == that.userFace &&
      idCardName == that.idCardName &&
      nickName == that.nickName &&
      deptName == that.deptName &&
      deptShortName == that.deptShortName
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      positionId,
      organizationId,
      deptId,
      isPartTimeStaffing,
      isAutoCreate,
      subjectLifeCycle,
      staffingNum,
      staffingId,
      staffingNumber,
      inductionState,
      tempLock,
      positionIdName,
      positionGradeName,
      stationName,
      originalRoleMemberId,
      roleMemberCode,
      isPtJob,
      userId,
      userFace,
      idCardName,
      nickName,
      deptName,
      deptShortName
    );
  }
}
